﻿<basics:ChildWindow
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:os="clr-namespace:OneStop.UI" 
	mc:Ignorable="d" xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
	x:Class="OneStop.UI.GasAdmin" 
	Title="GasAdmin" Loaded="ChildWindow_Loaded"
	Width="500" Height="350">
	<Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.Resources>
            <os:MODFormatConverter x:Key="MODConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="Auto" MinHeight="23" />
		</Grid.RowDefinitions>

		<Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,0,82,0" Grid.Row="1" />
		<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Grid.Row="1" />
        <ListBox x:Name="GasList" HorizontalAlignment="Left" Margin="8,8,0,8" Width="190" SelectionChanged="GasList_SelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding ShortName}" />
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding MOD14, Converter={StaticResource MODConverter}, ConverterParameter=1.4}" FontSize="10" Foreground="Blue" />
                            <TextBlock Text="; " FontSize="10" Foreground="Blue" />
                            <TextBlock Text="{Binding MOD16, Converter={StaticResource MODConverter}, ConverterParameter=1.6}" FontSize="10" Foreground="Red" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <os:GasDetail x:Name="Details" DataContext="{Binding SelectedItem, ElementName=GasList, Mode=TwoWay}" Margin="216,28,24,118" />

        <Button Margin="216,0,8,22" VerticalAlignment="Bottom" Content="Button" Height="22" Click="AddGas_Click"/>

    </Grid>
</basics:ChildWindow>